// 导入express
const express=require('express');
// 创建应用对象
const app=express();
// 导入fs
const fs=require('fs');
// 读取文件
const index_File=fs.readFileSync(__dirname+'/views/note.html').toString();
// 导入ejs
const ejs=require('ejs');

let title=' ejs!!'
let html=ejs.render(index_File,{title:title})

// 创建路由
app.get('/note',(req, res) => {
    res.send(html);
});
// 启动服务
app.listen(9000,()=>{
    console.log('The service has already been opened!!!');
});